// Package san implements functionality for dealing with (standard) algebraic notation.
//
// This packages is based on the specification of the FIDE Handbook, Appendice C., see
// http://www.fide.com/component/handbook/?id=125&view=article
package san

import (
	b "code.google.com/p/gochess/board"
	pos "code.google.com/p/gochess/position"
)

const (
	capture   = "x"
	enPassant = "e.p."
)

// helper function
func findMoves(moved pos.PieceType, destination b.Square, p *pos.Position,
	validMoves []pos.Move) []pos.Move {

	moves := []pos.Move{}
	for i := range validMoves {
		if validMoves[i].Destination() == destination &&
			p.Get(validMoves[i].Start()).Type() == moved {
			moves = append(moves, validMoves[i])
		}
	}
	return moves

}
